﻿<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
			<form id="form" method="POST" action="<?=site_url('archive/retire_update/'.$cateid)?>">
			<fieldset>
			<legend>退休证信息 Retirement Certification</legend>
			<label>姓名<br>Full Name:</label><input type="text" name="name" value="<?=@$info->name?>" /> <br /> <br>
			<label>性别<br>Sex:</label><input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?> />男 / Male<input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?> />女 / Female <br /><br>
			<label>出生日期<br>Date of Birth:</label><input type="text" name="birth" id="birth" value="<?=@$info->birth?>" /> <br /><br>
			<label>籍贯<br>Ancestral Home:</label><input type="text" id="native_place" name="native_place" value="<?=@$info->native_place?>" style="background: #FFFFC0;"/> <br /><br>
			<label>参加工作时间<br>Date of first employment:</label><input type="text" name="start_work" id="start_work" value="<?=@$info->start_work?>"/> <br /> <br>
			<label>工龄<br>Years of service:</label><input type="text" name="years_of_work" value="<?=@$info->years_of_work?>"/> <br /><br>
			<label>工种<br>Type of Work:</label><input type="text" name="types_of_work" value="<?=@$info->types_of_work?>"/> <br /> <br>
			<label>雇主<br>Last Employer:</label><input type="text" name="original_employer" size="50" value="<?=@$info->original_employer?>"/> <br />  <br>
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息 Continue" />
			<input id="button2" type="reset" value="重置 Cancel" />
			</fieldset>
			</form>
			</div>

		</div>

        <script type="text/javascript" src="js/jquery.autocomplete.pack.js"></script>
        <link type="text/css" rel="stylesheet" href="css/jquery.autocomplete.css"/>
        
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

	<script type="text/javascript">
	$().ready(function() {
	  $("#form").validate({
		rules: {
			name:{
			 required:true
			},
			sex:{
			 required:true
			},
			birth:{
			 required:true
			}
		}
	  });
		$( "#birth" ).datepicker({
			changeMonth: true,
			changeYear: true,
			showOn: "both",
			buttonImage: "images/calendar.gif",
			buttonImageOnly: true

		});
		$( "#start_work" ).datepicker({
			changeMonth: true,
			changeYear: true,
			showOn: "both",
			buttonImage: "images/calendar.gif",
			buttonImageOnly: true

		});
        
            
        $("#native_place").autocomplete("<?=base_url()?>user/quick_search_province", {
            minChars: 0,
            width: 500,
            matchContains: "word",
            autoFill: false,
            formatItem: function(row, i, max) {
                var arr = (row+"").split(",");
                return i + "/" + max + ": " + arr[1] + '['+ arr[2] +']';
            },
            formatMatch: function(row, i, max) {
                return row;
            },
            formatResult: function(row) {
                var arr = (row+"").split(",");
                return arr[2];
            }
        });      
	});
	</script>
	
<?=$this->load->view('include_footer',null)?>
